package org.vectrics.common.utils;

import org.apache.log4j.Logger;
import org.vectrics.VectricsException;

/**
 * @author mmoore
 *  This class provides a Runnable instance of the NetUtils method to save HTML to 
 * a static file.  This class can be run by a thread.
 */
public class SaveHtmlPageRunnable implements Runnable {
	private transient static Logger log = Logger.getLogger(SaveHtmlPageRunnable.class);
	private String ipAddress = null;
	private String fileName = null;

	/**
	 * 
	 */
	public SaveHtmlPageRunnable(String ipAddress, String fileName) {
		super();
		this.ipAddress = ipAddress;
		this.fileName = fileName;
	}

	public void run() {
		try {
			NetUtils.saveHtmlPageToFile(ipAddress, fileName);
		}
		catch (VectricsException ve) {
			log.error("VectricsException running task", ve);
		}
	}
}
